package gtkwire.widget.cairo;

public class CairoColor
{
	private double red = 0.0;
	private double green = 0.0;
	private double blue = 0.0;
	private double alpha = -1.0;

	public CairoColor( double red, double green, double blue )
	{
		this.red = red;
		this.blue = blue;
		this.green = green;
	}

	public CairoColor( double red, double green, double blue, double alpha )
	{
		this.red = red;
		this.blue = blue;
		this.green = green;
		this.alpha = alpha;
	}

	public double getRed(){ return red; }
	public double getGreen(){ return green; }
	public double getBlue(){ return blue; }
	public double getAlpha(){ return alpha; }
	public boolean hasAlpha(){ return !(alpha < 0.0); }
	public double[] getAsArray()
	{
		double[] arr = new double[4];
		arr[0] = red;
		arr[1] = green;
		arr[2] = blue;
		arr[3] = alpha;
		return arr;
	}
	
}//end class